<%@page import="javax.swing.text.Style"%>
<%@page import="org.apache.jasper.tagplugins.jstl.core.If"%>
<%@page import="com.el.User2"%>
<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style>
    tbody,tr,td{
    border:solid green 1px;
    }
</style>
</head>
<body>
		<table>
		     <thead>
		          <tr>
		              <td>编号</td>
		              <td>id</td>
		              <td>名字</td>
		              <td>生日</td>
		              <td>性别</td>
		              <td>职业</td>
		              <td>住所</td>
		              <td>手机号</td>
		          </tr>
		     </thead>
		
		<tbody>
		     
					<%
					  ArrayList<User2> users = (ArrayList<User2>)request.getAttribute("us");
					  for(int i=0;i<users.size();i++){
						  User2 user = users.get(i);
					  
					%>
					<%
					if((i+1)%2!=0){%>
						<tr style="background-color:greenyellow">
					<% }else{%>
						<tr>
					<%}%>
					
		                <td><%=i+1 %></td>
						<td><%=user.getId() %></td>
						<td><%=user.getName() %></td>
						<td><%=user.getBirthday() %></td>
						<td><%=user.getGender() %></td>
						<td><%=user.getCareer() %></td>
						<td><%=user.getAddress() %></td>
						<td><%=user.getMoblie() %></td>
					 </tr>
					<%
					  }
					%>
					
		</tbody>
		</table>
</body>
</html>